<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../../component/jquery/form/check/com-check.css">
    <link rel="stylesheet" href="../../../src/css/common/common.css">
    <script src="../lib/react.development.js"></script>
    <script src="../lib/react-dom.development.js"></script>
    <script src="../lib/babel.js"></script>
    <script src="../lib/prop-types.js"></script>
    <style>
    </style>
</head>
<body>

<script type="text/jsx">
    import React, { Component } from 'react';

    import Alert from "../alert.jsx";

    class Two extends Component {
        constructor(props){
            super(props);
            this.state = {
                num:1
            };
        }

        open=()=>{
            Alert.open({
                alertTip:"这是一个测试弹框",
                closeAlert:function(){
                    console.log("关闭了...");
                }
            });
        }
        render() {
            return (
                <div className="Two">
                    Two
                    <button onClick={this.open}>
                        开启宝藏
                    </button>
                    <div>{this.state.num}</div>
                </div>
            );
        }
    }

    export default Two;
</script>
</body>
</html>